home *** CD-ROM | disk | FTP | other *** search
NeXT TypedStream Data | 1995-06-12 | 13.7 KB | 339 lines |
- typedstream
- StreamTable
- HashTable
- Object
- [20c]
- typedstream
- [954c]
- typedstream
- HashTable
- Object
- FirstResponder
- HeaderClass
- %%%%i@@
- firstnib
- checkSpelling:
- alignSelCenter:
- unscript:
- pasteFont:
- runPageLayout:
- superscript:
- copyRuler:
- copyFont:
- selectAll:
- pasteRuler:
- toggleRuler:
- showGuessPanel:
- alignSelLeft:
- paste:
- performClose:
- arrangeInFront:
- subscript:
- copy:
- alignSelRight:
- delete:
- orderFrontColorPanel:
- underline:
- performMiniaturize:
- TwoDView
- /usr/include/netinet/in.h
- viewnib
- fgColorWell
- highColorWell
- lineWidthSlider
- lineWidthText
- statusText
- bgColorWell
- numPointsForm
- setHighColorWell:
- saveEPS:
- lineWidthChanged:
- animThenDisp:
- setFgColorWell:
- disp:
- setOperation:
- openData:
- saveData:
- close:
- setBgColorWell:
- saveTIFF:
- setAutoUpdate:
- random:
- [12982c]
- typedstream
- HashTable
- Object
- NibData
- @@@@s
- Storage
- {*@@}
- [67{*@@}]
- File's Owner
- CustomObject
- Application
- InfoPanel
- WindowTemplate
- iiii***@s@
- Panel
- Responder
- TextField
- Control
- TextFieldCell
- ActionCell
- mVersion 2.0 of 9/29/91. Share with your colleagues. Use the source.
- Don't pretend that you wrote it, though.
- Helvetica
- 2DLab
- by Patrick J. Flynn
- #Computational Geometry in the Plane
- (flynn@eecs.wsu.edu)
- VersionNumber
- Field1
- Field2
- Field3
- Field4
- MainMenu
- MenuTemplate
- *@*@ccc
- Matrix
- @:@iiii
- MenuCell
- ButtonCell
- Info Panel...
- Help...
- ff@@#::s
- submenuAction:
- Bitmap
- menuArrow
- Document
- Open Data...
- Save Data...
- Save TIFF...
- Save EPS...
- Close
- Paste
- Select All
- Windows
- Arrange in Front
- Colors...
- Miniaturize Window
- Close Window
- Print...
- MenuItem
- Geometry Window
- Window
- CustomView
- TwoDView
- HelpPanel
- ScrollView
- ClipView
- ciifffcfffs
- [5975c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
- \margl40
- \margr40
- {\colortbl\red0\green0\blue0;}
- \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b\i0\ul0\fs24\fc0 2DLab
- \b0 animates a few algorithms from computational geometry. It\
- was originally released in early 1990, back when I was a graduate\
- student at Michigan State University. In the process of updating\
- the program for 2.0, things changed substantially, and many features\
- were added. I hope you like the program.\
- \b Running the program
- \b0 \
- Two windows will appear when
- \b 2DLab
- \b0 is fired up. The Geometry Window\
- contains the data and the results of any algorithms run on the\
- data. The
- \b 2DLab Control
- \b0 window allows you to configure the data\
- set, the algorithm, and the drawing that takes place.\
- When the program is invoked, the
- \b Geometry Window
- \b0 will contain ten\
- points, and the selected algorithm (Prim's MST algorithm by default)\
- will be applied to these points. New points can be created by\
- clicking in the window. There is a `margin' around the border of\
- the window within which points will not be displayed, so If you\
- click the mouse button and no point appears, you're probably too\
- close to the edge (this margin was put in to make the Voronoi\
- tesselation have a nice border.\
- A new set of random points (uniformly distributed within the window's\
- usable region) can be generated by entering the desired number of\
- points in the editable text field and pressing the
- \b Generate
- \b0 button.\
- The highlighted button in the RadioButton array in the
- \b Control\
- Window
- \b0 identifies the particular algorithm to be `animated.'\
- \b Anim/Disp
- \b0 button will run the appropriate animation when pressed.\
- \b Disp
- \b0 button will simply display the resulting data structure without\
- animating. It only works when the data structure has already been previously\
- computed (i.e. ya gotta
- \b Anim
- \b0 before you can
- \b Disp
- \b0 ).\
- \b Auto-Go
- \b0 checkbox specifies the program's behavior when new\
- points are created with the mouse. If the box is checked, the\
- selected algorithm is run immediately when a new point is added.\
- The three
- \b color wells
- \b0 allow you to pick background, foreground,\
- and highlighting colors. When the display is drawn, points and\
- line segments appear in the foreground color. During animation,\
- transient drawing is done using the highlight color. By default,\
- these colors are white, black, and 67% gray, respectively. You\
- can set them to anything you want using the standard color well\
- tricks.\
- \b line width slider
- \b0 controls how thickly everything is drawn (both\
- points and lines).\
- The `
- \b Status
- \b0 ' item displays informative (?) messages about the\
- progress of the algorithm currently being animated, the drawing\
- taking place, etc.\
- \b Document menu
- \b0 allows you to save the current data set in a\
- `generic' form, load a similarly-formatted file in for animation,\
- and save the generated imagery as TIFF or EPS. The file format\
- for the data is simple. The first number is the number of ordered\
- pairs (%d), and the remaining numbers are the pairs (%f %f). The error\
- checking for I/O is pathetic, so please feed
- \b 2DLab
- \b0 well-behaved data files.\
- The Copy item of the Edit menu may be selected. It sticks the contents of\
- the Geometry window in the pasteboard.\
- \b Algorithms
- \b0 \
- In the following brief descriptions, N is the number of 2D points,\
- and the O-notation refers to time complexity rather than space\
- complexity. When the algorithms are invoked, those with quick eyes\
- will notice some graphical razzle-dazzle as the data structure is\
- constructed. After the algorithm has completed, the `resulting'\
- data structure will remain in the window.\
- - Prim's O(N^2) Minimal Spanning Tree (MST) algorithm.\
- - Kruskal's O(E log E) MST algorithm. WARNING: the implementation\
- in this program is NOT optimal (it's actually O(N^2)). Anybody\
- who wants to hack together the priority queue stuff to implement\
- the optimal algorithm is free to do so (lazy, that's me).\
- - Jarvis' O(N log N) convex hull construction algorithm.\
- - Graham's O(N log N) convex hull construction algorithm.\
- - Somebody's O(N log N) Voronoi diagram algorithm.\
- - Somebody's O(N log N) Delaunay triangulation algorithm. (code\
- for these last two algorithms was written by Seth Teller, who\
- apparently used Fortune's netlib code as a basis).\
- - my own Gabriel Graph construction algorithm (it uses the\
- Delaunay triangulation as a starting point).\
- - my own Relative Neighborhood Graph construction algorithm (again,\
- using the Delaunay triangulation as a starting point).\
- Those interested in the details of the algorithms should refer to\
- Preparata and Shamos' book on computational geometry. Sedgewick's\
- book also has covers geometric algorithms. The GG and RNG haven't\
- been used much, and are a little harder to find in the literature.\
- Consult Toussaint, `The relative neighborhood graph of a finite\
- point set', Pattern Recognition 12, 261-268 for info about the RNG.\
- The Gabriel graph was used in Matula and Sokal, `Properties of\
- Gabriel Graphs Relevant to Geographic Variation Research and the\
- Clustering of Points in the Plane', Geographical Analysis 12,\
- 205-222. However, I don't have either of those papers in my\
- posession. This software was based on the discussion in Tuceryan\
- and Chorzempa, `Relative Sensitivity of a family of closest-point\
- graphs in computer vision applications', Pattern Recognition 24,\
- 361-374.\
- About the author; feedback\
- This program was written by:\
- Patrick Flynn\
- Assistant Professor\
- School of Electrical Engineering and Computer Science\
- Washingon State University\
- Pullman, WA 99164-2752\
- (flynn@eecs.wsu.edu)\
- If you find bugs, let me know.\
- If you add functionality, let me know.\
- If you like/hate it and just want to tell me, let me know.\
- Date: 9/91\
- NXCursor
- NXImage
- NXibeam
- Scroller
- _doScroller:
- @@@ffsX
- About 2DLab
- ScrollingTextKE
- 2DLab Control
- [20@]
- Status
- Animation & Display
- Colors
- Algorithm to Animate
- Prim's MST
- radio
- radioH
- Kruskal's MST
- Jarvis' Convex Hull
- Graham's Convex Hull
- Voronoi Diagram
- Delaunay Triangulation
- Gabriel Graph
- Relative Neighborhood Graph
- Radio
- Button
- Anim/Disp
- Helvetica-Bold
- FormCell
- # Points:
- Field:
- Auto-Go
- switch
- switchH
- Generate
- Slider
- SliderCell
- NXColorWell
- Background
- Foreground
- Line width: 4.0
- Highlight
- # Points
- Slider2
- ColorWell
- Field
- NXColorWell1
- {i*@@@}
- [32{i*@@@}]
- hide:
- terminate:
- paste:
- selectAll:
- makeKeyAndOrderFront:
- printPSCode:
- openData:
- saveData:
- close:
- copy:
- lineWidthText@
- lineWidthSlider@
- bgColorWell@
- fgColorWell@
- highColorWell@
- numPointsForm@
- setOperation:~@
- lineWidthChanged:
- random:
- setAutoUpdate:
- performMiniaturize:
- performClose:
- arrangeInFront:
- orderFrontColorPanel:
- saveTIFF:
- saveEPS:
- animThenDisp:
- disp:
- statusText@
-